/**
 * 
 */
package org.gaming.prefab.thing.bign;

import java.math.BigDecimal;
import java.util.List;

import org.gaming.common.asserts.ITipCause;
import org.gaming.prefab.IGameCause;
import org.gaming.prefab.thing.cost.CostReceipt;
import org.gaming.prefab.thing.cost.ICostThing;
import org.gaming.prefab.thing.reward.RewardReceipt;

/**
 * @author YY
 * 实物
 */
public abstract class InstanceThingStorer<Log extends InstanceThingLog, R extends RewardReceipt<BigDecimal>> extends BignThingStorer<R, CostReceipt<BigDecimal>> {
	
	@Override
	protected final void afterCost(long entityId, int dbZone, CostReceipt<BigDecimal> receipt, IGameCause cause, String remark) {
		throw new UnsupportedOperationException("instance thing " + thingType().getDesc() + " can't cost");
	}

	@Override
	protected final CostReceipt<BigDecimal> doCost(long entityId, List<ICostThing<BigDecimal>> costThings, IGameCause cause, String remark) {
		throw new UnsupportedOperationException("instance thing " + thingType().getDesc() + " can't cost");
	}
	
	protected void afterAdd(long entityId, int dbZone, R receipt, IGameCause cause, String remark) {}

	@Override
	protected final ITipCause lackCode() {
		throw new UnsupportedOperationException("instance thing " + thingType().getDesc() + " can't cost");
	}

	@Override
	public final BigDecimal getCount(long entityId, int thingId) {
		throw new UnsupportedOperationException("instance thing " + thingType().getDesc() + " can't cost");
	}
}
